package com.cloudfun.campusshare.common.constant;

/**
 * @author : zhangyongjie
 * @version : 1.0
 * @createTime : 2020/5/9 19:54
 * @description : 工单种类
 */
public enum WorkerOrderTaskType {

    DEVICE_REPAIR(1, "设备报修");

    private int code;
    private String message;

    WorkerOrderTaskType(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

    public static WorkerOrderTaskType getByCode(int code){
        WorkerOrderTaskType[] values = WorkerOrderTaskType.values();
        for(WorkerOrderTaskType workerOrderTaskType : values){
            if(workerOrderTaskType.code == code){
                return workerOrderTaskType;
            }
        }
        return null;
    }
}
